package animal;

public class ZooApp {
    public static void main(String[] args) {
        Feeder feeder=new Feeder("张三");
        //Animal animal=new Cat();
        Cat cat=new Cat("猫咪花花");
        Dog dog = new Dog("金毛大黄");
        Food food=new Food("小鱼干儿");
        Food food1=new Food("肉骨头");
        feeder.feed(cat,food);
        feeder.feed(dog,food1);
        feeder.feed(new Animal(){//匿名内部类
            @Override
            public void shout(){
                System.out.println("嗷嗷嗷");
            }
        },food1);
        feeder.feed(cat,new Food("猫草"));//匿名对象
    }
}
